home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-01
/
cmidilib.zip
/
NOTEON.C
< prev
next >
Wrap
C/C++ Source or Header
|
1991-08-23
|
510b
|
37 lines
#include <stdio.h>
#include <ctype.h>
#include "midifile.h"
#include "console.h"
FILE *F;
extern long Mf_currtime;
mygetc() { return(getc(F)); }
mynoteon(chan,note,velocity)
int chan;
unsigned char note;
unsigned char velocity;
{
printf("%ld: chan=%d, note=%d, velocity=%d\n",Mf_currtime, chan, note, velocity);
}
main(argc,argv)
char **argv;
{
argc = ccommand(&argv);
if ( argc > 1 )
F = fopen(argv[1],"r");
else
F = stdin;
Mf_getc = mygetc;
Mf_noteon = mynoteon;
midifile();
exit(0);
}